<!--
 * @Description: 
 * @Author: 赵华宇
 * @Date: 2025-04-24 09:29:56
 * @LastEditors: 赵华宇
 * @LastEditTime: 2025-04-24 10:12:08
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Flex布局</title>
    <style>
        /* 弹性容器 */
        .box{
            /* flex布局 结构化布局*/
            display: flex;
            justify-content: space-between;
            /* 弹性盒子在侧轴方向没有尺寸才能拉伸 */
            /* align-items: stretch; */
            /* align-items: center; */
            /* align-items: flex-start; */
            align-items: flex-end;
            height: 300px;
            border: 1px solid black;
        }
        /* 弹性盒子 默认主轴方向排列 */
        .box div{
            /* float:left;
            margin:50px; */
            width: 300px;
            height: 100px;
            background-color: pink;
        }
        /* 第二个div 侧轴居中对齐 */
        .box div:nth-child(2){
            /* 单独控制某一个align-self */
            align-self: center;
        }
    </style>
</head>
<body>
    <div class="box">
        <div>1</div>
        <div>2</div>
        <div>3</div>
    </div>
</body>
</html>